package com.ruoyi.consumer.mapper;

import com.ruoyi.consumer.domain.CStatisticSumTable;
import com.ruoyi.consumer.domain.CStatisticTable;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * 统计总Mapper接口
 *
 * @author YFENTEST
 * @date 2024-03-11
 */
public interface CStatisticTableMapper {
    /**
     * 查询统计总
     *
     * @param statisticId 统计总主键
     * @return 统计总
     */
    public CStatisticTable selectCStatisticTableByStatisticId(Integer statisticId);

    /**
     * 查询统计总列表
     *
     * @param cStatisticTable 统计总
     * @return 统计总集合
     */
    public List<CStatisticTable> selectCStatisticTableList(CStatisticTable cStatisticTable);

    /**
     * 新增统计总
     *
     * @param cStatisticTable 统计总
     * @return 结果
     */
    public int insertCStatisticTable(CStatisticTable cStatisticTable);

    /**
     * 修改统计总
     *
     * @param cStatisticTable 统计总
     * @return 结果
     */
    public int updateCStatisticTable(CStatisticTable cStatisticTable);

    /**
     * 删除统计总
     *
     * @param statisticId 统计总主键
     * @return 结果
     */
    public int deleteCStatisticTableByStatisticId(Integer statisticId);

    /**
     * 批量删除统计总
     *
     * @param statisticIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteCStatisticTableByStatisticIds(Integer[] statisticIds);


    public CStatisticSumTable selectCStatisticSumTableByStatisticId(Integer statisticId);

    public List<CStatisticTable> selectYesterdayFacilitIdOrderFilledSum(@Param("updateTime") Date updateTime, @Param("facilitId") Integer facilitId);

    public List<CStatisticTable> selectYesterdayFuserIdOrderFilledSum(@Param("updateTime") Date updateTime, @Param("fuserId") Integer fuserId);

    public List<CStatisticTable> selectYesterdayUserIdOrderFilledSum(@Param("updateTime") Date updateTime, @Param("userId") Integer userId);

    public List<CStatisticTable> selectYesterdayCompanyIdOrderFilledSum(@Param("updateTime") Date updateTime, @Param("companyId") Integer companyId);

    public List<CStatisticTable> selectYesterdayMagngerIdOrderFilledSum(@Param("updateTime") Date updateTime, @Param("magngerId") Integer magngerId);

    public List<CStatisticTable> selectYesterdayLeaderIdOrderFilledSum(@Param("updateTime") Date updateTime, @Param("leaderId") Integer leaderId);

    public List<CStatisticTable> selectYesterdayCarIdOrderFilledSum(@Param("updateTime") Date updateTime, @Param("carId") Integer carId);

    public List<CStatisticTable> selectYesterdaySnOrderFilledSum(@Param("updateTime") Date updateTime, @Param("sn") String sn);

    public List<CStatisticTable> selectYesterdayOrderFilledSum(@Param("updateTime") Date updateTime,
                                                               @Param("facilitId") Integer facilitId,
                                                               @Param("fuserId") Integer fuserId,
                                                               @Param("userId") Integer userId,
                                                               @Param("companyId") Integer companyId,
                                                               @Param("magngerId") Integer magngerId,
                                                               @Param("leaderId") Integer leaderId,
                                                               @Param("carId") Integer carId);

}
